Add support for ISO 4914 UPI validation#503
Open
JonArnfred wants to merge 1 commit into
Open
Conversation
Add validation for Unique Product Identifiers, including the QZ prefix, restricted alphabet, and ISO 7064 Mod 31, 30 check character.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add support for validating ISO 4914 Unique Product Identifiers (UPIs).
A UPI is a 12-character financial identifier for over-the-counter derivative products. The implementation validates:
QZprefix;It also provides the standard
compact(),validate(),is_valid(), andcalc_check_digit()interfaces.References
Testing
Publicly documented real UPI examples appear to be limited, so the test set currently contains four published examples. The official DSB archive requires registration, I can look into that if we need more examples.